<template>
	<!-- vue3 生命周期 -->
	<view class="layout">
		<scroll-view scroll-x scroll-y="true" class="scroll" ref="scroll">
			<view></view>
		</scroll-view>	
		<Life v-if="show"></Life>
	</view>
</template>

<script setup>
	// 主要用到的是 setup 里面写方法；onMounted 如果操作 dom 的话；onUnmounted 卸载组件
import {onMounted, ref} from "vue";
const scroll = ref(null);
console.log(scroll.value)

onMounted(()=>{
	console.log(scroll.value);
})

const show = ref(true);

setTimeout(()=>{
	show.value = false
},2000)

</script>

<style lang="scss" scoped>

</style>
